package com.gof.example.command.macro;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/10 10:38.
 * haiming.fei@tongdun.cn
 */
public class MutiplierCommand extends Command {

    private Multiplier multiplier;

    public MutiplierCommand() {
    }

    public MutiplierCommand(Object object) {
        this(object, new Multiplier());
    }

    public MutiplierCommand(Object object, Multiplier multiplier) {
        super(object);
        this.multiplier = multiplier;
    }

    public Multiplier getMultiplier() {
        return multiplier;
    }

    @Override
    void excute() {
        multiplier.multiply((Double) object);
    }
}
